function setFingerprintCookie() {
    Fingerprint2.get(function (components) {
        $.cookie('fingerprint', Fingerprint2.x64hash128(components.map(function (pair) {
            if (pair.key == 'deviceMemory') {
                return ''
            }
            return pair.value
        }).join(), 31), {expires: 365});
    })
}

if (window.requestIdleCallback) {
    requestIdleCallback(setFingerprintCookie);
} else {
    setTimeout(setFingerprintCookie, 500);
}